package demo.messaging.client.core;

import java.util.HashMap;
import java.util.Map;

/**
 *  Simulate Spring application context for GWT.
 *  
 * @author Prawee Sriplakich
 *
 */
public class ApplicationContext {

	private static Map<String, Object> BEAN_MAP = new HashMap();

	public static <T> T getBean(final String id) {
		return (T) BEAN_MAP.get(id);
	}

	public static Object putBean(final String id, final Object bean) {
		return BEAN_MAP.put(id, bean);
	}

}
